﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HA.Data
{
    [Serializable]
    public class ScatterPoint:ICloneable
    {
        /// <summary>
        /// 离散点坐标及value信息
        /// </summary>
        /// <param name="id"></param>
        /// <param name="values"></param>
        /// <param name="x"></param>
        /// <param name="y"></param>
        /// <param name="z"></param>
        /// <param name="lable"></param>
        public ScatterPoint(string id, List<double> values, double x, double y, double z = double.NaN)
        {
            this._id = id;
            this._values = values;
            this._x = x;
            this._y = y;
            this._z = z;
        }

        string _id;

        public string Id
        {
            get { return _id; }
        }

        //string _label;

        //public string Label
        //{
        //    get { return _label; }
        //    set { _label = value; }
        //}
        double _x;

        public double X
        {
            get { return _x; }
            set { _x = value; }
        }
        double _y;

        public double Y
        {
            get { return _y; }
            set { _y = value; }
        }
        double _z;

        public double Z
        {
            get { return _z; }
            set { _z = value; }
        }

        List<double> _values;

        public List<double> Values
        {
            get { return _values; }
            set { _values = value; }
        }



        public object Clone()
        {
            ScatterPoint sp = (ScatterPoint)this.MemberwiseClone();

            sp.Values = new List<double>();
            sp.Values.AddRange(this.Values);

            return sp;
        }
    }
}
